from django.db import models


# Create your models here.

class User(models.Model):
    # 字段名不能是Python关键字
    uid = models.AutoField(primary_key=True, db_column='uid')
    # CharField必须要指定长度
    username = models.CharField(max_length=30)
    password = models.CharField(max_length=30)
    registerTime = models.DateTimeField(auto_now_add=True)

    class Meta:  # 元数据, 保存模型本身的信息
        # 默认表名: 应用名_模型名
        db_table = 'user'
